<!DOCTYPE html>
<html lang="en">
<!--header-->
<include file="Public:header"/>
<!--header-->

<section id="main-content">
    <section class="wrapper">
        <h3><i class="fa fa-angle-right"></i> 用户标签</h3>
        <div class="row mt">
            <div class="col-md-12">
                <div class="content-panel">
                    <table class="table table-striped table-advance table-hover">
                        <h4><i class="fa fa-angle-right"></i> 用户标签
                        </h4>
                        <hr>
                        <thead>
                        <tr>
                            <th>编号</th>
                            <th>标签类型</th>
                            <th>标签内容</th>
                            <!--<th>修改时间</th>
                            <th>创建时间</th>-->
                            <th>操作</th>
                        </tr>
                        </thead>
                        <foreach name="list" item="v">
                            <tr>
                                <td>{$v.id}</td>
                                <td>{$v.name}</td>
                                <td>{$v.content}</td>
                                <!--<td><if condition="$v['up_at'] != 0">{$list.up_at|date="Y-m-d H:i:s",###}<else/>无</if></td>
                                <td>{$list.create_at|date="Y-m-d H:i:s",###}</td>-->
                                <td>
                                    <a  href="{:U('tags_form',array('id'=>$v['id']))}" class="btn btn-primary btn-xs"><i class="fa fa-pencil"></i></a>
                                </td>
                            </tr>
                      </foreach>
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
    </section>
</section>

</section>
<!--footer-->
<include file="Public:footer"/>
<!--footer-->
<script type="text/javascript" src="__PUBLIC__/ui/lib/layer/2.4/layer.js"></script>
<script type="text/javascript">
    $(function() {
        //    fancybox
        jQuery(".fancybox").fancybox();
    });
</script>
<script>
    function del(id,type) {
        var currpage = "{$currpage}";
        if(id > 0){
            layer.confirm('确认要删除该内容？', {
                title: '删除提示：',
                btn: ['确定'] //可以无限个按钮
            }, function(index, layero){
                $.ajax({
                    type:"post",
                    data:{id:id,type:type},
                    url:"{:U('Del/del')}",
                    success:function (res) {
                        if(res.status == 1){
                            layer.open({
                                title: '',
                                content: "删除成功",
                            });
                            if(currpage == 1){
                                location.href="__APP__/Dashboard/Goods/xu";
                            }else{
                                location.href="__APP__/Dashboard/Goods/xu/currpage/"+currpage;
                            }
                        }
                        if(res.status == 2){
                            layer.open({
                                title: ''
                                ,content: "删除失败"
                            });
                            _pass = false;
                        }
                    }
                })
            });
        }
    }
</script>

</body>
</html>
